package com.budwk.app.sqfw.services.impl;

import com.budwk.app.sqfw.models.*;
import com.budwk.app.sqfw.services.*;
import com.budwk.starter.database.service.BaseServiceImpl;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.IocBean;

import java.util.List;

/**
 * @author LJT
 * @since 2023/10/19
 */
@IocBean(args = {"refer:dao"})
public class SqfwInfoManageForAdminServiceImpl extends BaseServiceImpl<Sqfw_formSummary> implements SqfwInfoManageForAdminService {
    public SqfwInfoManageForAdminServiceImpl(Dao dao) {
        super(dao);
    }

    /**
     * 修改社区信息
     * @param sqfwInfo
     */
    @Override
    @Aop(TransAop.READ_COMMITTED)
    public void updateSqfwInfo(Sqfw_formSummary sqfwInfo) {
        this.dao().updateIgnoreNull(sqfwInfo);
    }

    /**
     * 修改社区信息
     * @param sqfwInfoList
     */
    @Override
    @Aop(TransAop.READ_COMMITTED)
    public Integer InsertSqfwInfo(List<Sqfw_formSummary> sqfwInfoList) {
        this.dao().insert(sqfwInfoList);
        return 0;
    }

    /**
     * 批量删除
     * @param ids
     * @return
     */
    @Override
    @Aop(TransAop.READ_COMMITTED)
    public Integer batchDelete(List<String> ids) {
        return this.dao().delete(ids);
    }
}
